#!/bin/bash
IS_someone=`who | grep xxj`
if [ -z "$IS_someone" ]
then
	exit
elif [ -f /etc/1.txt ]
then
ls -l /home/xxj/123>/etc/2.txt                
cat /home/xxj/123>/etc/4.txt
a=`diff /etc/1.txt /etc/2.txt`
b=`diff /etc/3.txt /etc/4.txt`
else
ls -l /home/xxj/123>/etc/1.txt            
cat /home/xxj/123>/etc/3.txt
exit
fi		
if [ -z $a ]
	
then
		
echo #
	
else
		
echo "file changed"
		
echo $a 
		
rm /etc/1.txt
		
mv /etc/2.txt /etc/1.txt
          
	
fi

        
if [ -z $b ]
        
then
                
echo #
       
 else
                
echo "file content changed"
                
echo $b
                
rm /etc/3.txt
                
mv /etc/4.txt /etc/3.txt
        
fi

fi





